package com.iflytek.controller;

import com.iflytek.feignclients.IHystrixClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yfliu9
 * @version 1.0
 * @description: TODO
 * @date 2021/9/6 20:37
 */
@RestController
@Slf4j
public class TestDemoController {

    @Autowired
    private IHystrixClient hystrixClient;

    @GetMapping("/test")
    public String test() {
        log.info("test ok");
        String demoResult = hystrixClient.demo(-1);
        log.info("demo result：{}", demoResult);
        return "test ok";
    }
}
